package com.example.duanjunjie.learn.kotlin

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.widget.TextView
import android.widget.Toast
import com.example.duanjunjie.learn.R

/**
 * Created by duanjunjie on 2018/1/15.
 */

class KotlinTestActivity : AppCompatActivity() {
    private var textView: TextView? = null
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_kotlintest)
        textView = findViewById(R.id.textView)
        textView!!.setOnClickListener { showToast() }
    }

    private fun showToast() {
        Toast.makeText(this, "kotlin", Toast.LENGTH_SHORT).show()
    }

    override fun onResume() {
        super.onResume()

    }
}
